package com.menghai;


import java.util.UUID;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
public class Test {
	public static void main(String[] args) {
//		Configuration cfg = new Configuration().configure();
//		
//		SessionFactory sf = cfg.buildSessionFactory();
//		
//		Session session = sf.openSession();
//		
//		Transaction tran = session.beginTransaction();
//		
//		MtsIncidentRecommendLabel irl = new MtsIncidentRecommendLabel();
//		MtsUserRecommend ur = new MtsUserRecommend();
//		irl.setLName("2");
//		irl.setLRelation("1");
//		irl.setLState(1);
//		
//		ur.setRUserId(1);
//		ur.setRWeight(1f);
//		ur.setMtsIncidentRecommendLabelByRLabelId(irl);
//		
//		session.save(ur);
//		session.save(irl);
//		tran.commit();
//		session.close();
//		
		System.out.println(UUID.randomUUID());
		System.out.println(UUID.randomUUID().toString().replaceAll("-", ""));
		System.out.println(UUID.randomUUID().toString().replaceAll("-", "").length());
		//MtsIncidentRecommendLabel irl = (MtsIncidentRecommendLabel) session.get(MtsIncidentRecommendLabel.class, 27);
		//System.out.println(irl.getMtsUserRecommendsForLId().size());
		//MtsUserRecommend ur = (MtsUserRecommend) session.get(MtsUserRecommend.class, 4);
		//session.delete(irl);
		//tran.commit();
	}
}
